﻿@if (Request.Cookies["userID"] != null)
{
    string userName = Request.Cookies["userName"].Value;
    if (Request.Cookies["userType"].Value == "2")
    {
        <div class="btn-group nav navbar-nav navbar-right" onmouseout="autoUp()" style="margin-top: 0px; height: 55px;">
            <button type="button" onmouseup="autoDrop()" style="height: inherit; width: 160px; border: 0px; " class="button button-dropdown button-border" data-toggle="dropdown" aria-expanded="false">
                @userName <span class="caret"></span>
            </button>
            <ul id="userList" class="dropdown-menu" role="menu">
                <li><a href="#" style="font-family: 微软雅黑; font-size: 16px; text-align: center; ">个人中心</a></li>
                <li class="divider"></li>
                <li><a href="#" style="font-family: 微软雅黑; font-size: 16px; text-align: center; ">我的试卷</a></li>
                <li class="divider"></li>
                <li><a href="#" style="font-family: 微软雅黑; font-size: 16px; text-align: center; ">我的收藏</a></li>
                <li class="divider"></li>
                <li><a href="#" style="font-family: 微软雅黑; font-size: 16px; text-align: center; ">退出登录</a></li>
            </ul>
        </div>
    }
    else if (Request.Cookies["userType"].Value == "1")
    {
        <div class="btn-group nav navbar-nav navbar-right" style="margin-top: 0px; height: 55px;">
            <button type="button" style="height: inherit; width: 160px; border: 0px; " class="button button-dropdown button-border" data-toggle="dropdown" aria-expanded="false">
                @userName <span class="caret"> </span>
            </button>
            <ul id="userList" class="dropdown-menu" role="menu">
                <li><a href="#" style="font-family: 微软雅黑; font-size: 16px; text-align: center; ">出试卷</a></li>
                <li class="divider"></li>
                <li><a href="#" style="font-family: 微软雅黑; font-size: 16px; text-align: center; ">个人中心</a></li>
                <li class="divider"></li>
                <li><a href="#" style="font-family: 微软雅黑; font-size: 16px; text-align: center; ">我的试卷</a></li>
                <li class="divider"></li>
                <li><a href="#" style="font-family: 微软雅黑; font-size: 16px; text-align: center; ">我的收藏</a></li>
                <li class="divider"></li>
                <li><a href="#" style="font-family: 微软雅黑; font-size: 16px; text-align: center; ">退出登录</a></li>
            </ul>
        </div>
    }
}
else
{
    <ul class="nav navbar-nav navbar-right">
        <li><a onclick="onlyShowLogin()" style="cursor: pointer;">登陆</a></li>
        <li><a onclick="onlyShowRegister()" style="cursor: pointer;">注册</a></li>      
    </ul>
}